using System.ComponentModel.DataAnnotations;

namespace StudentManagement.Application.DTOs;

public class RegisterDTO
{
    [Required(ErrorMessage = "用户名不能为空")]
    [StringLength(50, ErrorMessage = "用户名长度不能超过50个字符")]
    public string Username { get; set; }
    
    [Required(ErrorMessage = "密码不能为空")]
    [StringLength(100, MinimumLength = 6, ErrorMessage = "密码长度必须在6到100个字符之间")]
    [DataType(DataType.Password)]
    public string Password { get; set; }
    
    [Required(ErrorMessage = "确认密码不能为空")]
    [DataType(DataType.Password)]
    [Compare("Password", ErrorMessage = "密码和确认密码不匹配")]
    public string ConfirmPassword { get; set; }
    
    [Required(ErrorMessage = "电子邮箱不能为空")]
    [EmailAddress(ErrorMessage = "请输入有效的电子邮箱地址")]
    public string Email { get; set; }
    
    [StringLength(20, ErrorMessage = "电话号码长度不能超过20个字符")]
    public string PhoneNumber { get; set; }
    
    [Required(ErrorMessage = "全名不能为空")]
    [StringLength(100, ErrorMessage = "全名长度不能超过100个字符")]
    public string FullName { get; set; }
}